<template>
  <div>商品详情页面</div>
</template>
<script>
export default {
  beforeRouteEnter(to, from, next) {
    // ...如果登陆则进入否则就返回首页
    let token = sessionStorage.getItem("token");
    if (token != null) {
      next();
    } else {
      next("/home");
    }
  },
};
</script>
<style scoped>
</style>